﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Vds2465Telegrams
{
	[TestClass]
	public class ReportType_Fire_Test
	{
		[TestMethod]
		[Owner("Frank Eppink")]
		public void Test01_Equals()
		{
			ReportType_Fire reportTypeFire = new ReportType_Fire(false, eReportSubType_Fire.Automatic);

			{
				// completely different type - NOT equal
				object dummyObject = new object();
				Assert.IsFalse(reportTypeFire.Equals(dummyObject));
			}

			{
				// same type - same property values
				ReportType_Fire reportTypeFire2compare = new ReportType_Fire(reportTypeFire.OnOffFlag, reportTypeFire.ReportSubType);
				Assert.IsTrue(reportTypeFire.Equals(reportTypeFire2compare));
			}

			{
				// same type - different OnOffFlag
				ReportType_Fire reportTypeFire2compare = new ReportType_Fire(!reportTypeFire.OnOffFlag, reportTypeFire.ReportSubType);
				Assert.IsFalse(reportTypeFire.Equals(reportTypeFire2compare));
			}

			{
				// same type - different ReportSubType
				eReportSubType_Fire reportSubTypeFire = eReportSubType_Fire.Manual;
				if (reportTypeFire.ReportSubType == eReportSubType_Fire.Manual)
				{
					reportSubTypeFire = eReportSubType_Fire.General;
				}
				ReportType_Fire reportTypeFire2compare = new ReportType_Fire(reportTypeFire.OnOffFlag, reportSubTypeFire);
				Assert.IsFalse(reportTypeFire.Equals(reportTypeFire2compare));
			}
		}

		[TestMethod]
		[Owner("Frank Eppink")]
		public void Test02_GetHashCode()
		{
			ReportType_Fire reportTypeFire = new ReportType_Fire(false, eReportSubType_Fire.Automatic);
			int hashCode01 = reportTypeFire.GetHashCode();
		}

		[TestMethod]
		[Owner("Frank Eppink")]
		public void Test03_ToString()
		{
			ReportType_Fire reportTypeFire = new ReportType_Fire(true, eReportSubType_Fire.Manual);
			string stringResult = reportTypeFire.ToString();
			Assert.IsNotNull(stringResult);
		}
	}
}
